package com.yangjiayu.service;

import org.springframework.core.io.Resource;
import org.springframework.ai.document.Document;

import java.util.List;

/**
 * @Classname DocumentService
 * @Description TODO
 * @Date 2025/8/14 19:48
 * @Created by YangJiaYu
 */
public interface DocumentService {

    /**
     * 加载文档并且读取数据进行保存到知识库
     * @param resource
     * @param fileName
     */
    public List<Document> loadText(Resource resource,String fileName);


    /**
     * 根据提问从知识库中查询相应的知识/资料(相似)
     * @param question
     * @return
     */
    public List<Document> doSearch(String question);
}
